package acm.蓝桥21;

import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.io.StreamTokenizer;
import java.util.Scanner;

public class A能被模的数 {
	public static void main(String[] args) {
		Reader sc = new Reader(System.in);
		int t = sc.nextInt();
		while (t-- > 0) {
			int n = sc.nextInt();
			int m = sc.nextInt();
			if(check(n, m)) {
				Reader.pw.println("Yes");
			}else {
				Reader.pw.println("No");
			}
		}
		Reader.pw.flush();
	}

	public static boolean check(int n, int m) {
		boolean[] index = new boolean[100000];
		for (int i = 1; i <= m; i++) {
			if(index[n%i]) {
				return true;
			}
			index[n%i]=true;
		}
		return false;
	}
	static class Reader {
		static StreamTokenizer in = new StreamTokenizer(new BufferedReader(new InputStreamReader(System.in)));
		static PrintWriter pw = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));

		public Reader(Object... o) {
		}

		public int nextInt() {
			return (int) nextToken();
		}
		
		public long nextLong() {
			return (long) nextToken();
		}

		private double nextToken() {
			try {
				in.nextToken();
			} catch (Exception ignored) {
			}
			return in.nval;
		}
	}
}
